package com.example.apiversioncontroldemo.web.v;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chen.cr
 * @since 2023/10/18
 */
@RestController
//@RequestMapping("/{version}/hello")
@RequestMapping("/hello")
public class HelloController {


    @GetMapping("/test1")
    public String test1(String name) {
        return "Name is: " +  name + ".  (This is 'v' api interface.)";
    }


    @GetMapping("/test2")
    public String test2(int age) {
        return "Age is: " +  age + ".  (This is 'v' api interface.)";
    }


}
